package com.reggie.module.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.reggie.common.ResultResponseVo;
import com.reggie.module.entity.dto.employeeDto.AddEmployeeDto;
import com.reggie.module.entity.dto.employeeDto.ChangeStatusDto;
import com.reggie.module.entity.dto.employeeDto.EmployeeLoginDto;
import com.reggie.module.entity.dto.employeeDto.UpdateEmployeeDto;
import com.reggie.module.entity.po.Employee;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author 早睡蛋
 * @Date 2022/9/17 14:28:46
 * @Desc:
 */
public interface EmployeeService extends IService<Employee> {

    /**
     * 登录
     * @param request
     * @param employeeLoginDto
     * @return
     */
    ResultResponseVo login(HttpServletRequest request, EmployeeLoginDto employeeLoginDto);

    /**
     * 退出
     * @param request
     * @return
     */
    ResultResponseVo logout(HttpServletRequest request);

    /**
     * 添加员工
     * @param request
     * @param addEmployeeDto
     * @return
     */
    ResultResponseVo save(HttpServletRequest request, AddEmployeeDto addEmployeeDto);

    /**
     * 分页查询
     * @param page
     * @param pageSize
     * @param name
     * @return
     */
    ResultResponseVo selectByPage(int page, int pageSize, String name);

    /**
     * 修改员工状态信息
     * @param changeStatusDto
     * @param request
     * @return
     */
    ResultResponseVo changeStatus(ChangeStatusDto changeStatusDto, HttpServletRequest request);

    /**
     * 修改员工前获取员工信息
     * @param id
     * @return
     */
    ResultResponseVo getByEmpId(Long id);

    /**
     * 编辑员工信息
     * @param updateEmployeeDto
     * @param request
     * @return
     */
    ResultResponseVo updateEmp(UpdateEmployeeDto updateEmployeeDto, HttpServletRequest request);
}
